package com.jieli.bt.att.data.device

import android.bluetooth.BluetoothDevice

/**
 * DeviceConnection
 * @author zqjasonZhong
 * @since 2024/5/15
 * @email zhongzhuocheng@zh-jieli.com
 * @desc 设备连接状态
 */
data class DeviceConnection(val device: BluetoothDevice, var state: Int) {

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as DeviceConnection

        if (device != other.device) return false

        return true
    }

    override fun hashCode(): Int {
        return device.hashCode()
    }
}
